From e77e6c2b4aaa09231e49dba94307eb059454d5e4 Mon Sep 17 00:00:00 2001 From: robertl Date: Fri, 7 Feb 2003 23:17:21 +0000 Subject: [PATCH] Filter test. Thanx, Alex. --- gpsbabel/testo | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gpsbabel/testo b/gpsbabel/testo index 43ad07117..752a33d9c 100755 --- a/gpsbabel/testo +++ b/gpsbabel/testo @@ -218,3 +218,23 @@ ${PNAME} -i gcdb -f reference/GeocachingDB.PDB -o gpx -F ${TMPDIR}/gcdb1.gpx \ -o gcdb -F ${TMPDIR}/gcdb1.pdb ${PNAME} -i gpx -f ${TMPDIR}/gcdb1.gpx -o gpx -F ${TMPDIR}/gcdb2.gpx compare ${TMPDIR}/gcdb1.gpx ${TMPDIR}/gcdb1.gpx + +# +# Duplicate filter - Since filters have no format of their own, we use csv +# as an intermediate format for testing the filter. +# +rm -f ${TMPDIR}/filterdupe.csv1 ${TMPDIR}/filterdupe.csv2 +${PNAME} -i geo -f geocaching.loc -o csv -F ${TMPDIR}/filterdupe.csv1 +${PNAME} -i geo -f geocaching.loc -f geocaching.loc -x duplicate,shortname \ + -o csv -F ${TMPDIR}/filterdupe.csv2 +compare ${TMPDIR}/filterdupe.csv1 ${TMPDIR}/filterdupe.csv2 + +# +# Position filter - Since very small distances are essentialy a duplicate +# position filter, we can test very similarly to the duplicate filter. +# +rm -f ${TMPDIR}/filterpos.csv1 ${TMPDIR}/filterpos.csv2 +${PNAME} -i geo -f geocaching.loc -o csv -F ${TMPDIR}/filterpos.csv1 +${PNAME} -i geo -f geocaching.loc -f geocaching.loc -x position,distance=5f \ + -o csv -F ${TMPDIR}/filterpos.csv2 +compare ${TMPDIR}/filterpos.csv1 ${TMPDIR}/filterpos.csv2 -- 2.30.2